From: Adel Gadllah Date: Mon, 18 Feb 2013 17:03:13 +0000 (+0100) Subject: userMenu: Use the session id to detect the current session X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4778 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e411a4af21879457b22c668ac06671e5025b2d6c;p=gnome-shell.git userMenu: Use the session id to detect the current session This allows us to detect startx sessions. https://bugzilla.gnome.org/show_bug.cgi?id=693896 --- diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js index b12eee237..ff38859a8 100644 --- a/js/ui/userMenu.js +++ b/js/ui/userMenu.js @@ -48,6 +48,7 @@ const IMStatus = { const SystemdLoginSessionIface = + @@ -960,8 +961,7 @@ const UserMenuButton = new Lang.Class({ if (proxy.Class != "user") continue; - if (userName == GLib.get_user_name() && - !proxy.Remote && proxy.Type == "x11") + if (proxy.Id == GLib.getenv('XDG_SESSION_ID')) continue; sessions.push({ user: this._userManager.get_user(userName),